
base.getHtmlWithSecondLevelElements = (elements) => {
    // Получаем html с элементами второго уровня

    let elementsHtml = '';

    for (let element in elements) {
        element = elements[element]
        const elementHtml = `
            <a href="#2-${element.id}"
               class="menu-element-level second-level-element"
               data-menu-element-level
               data-list_of_subelements-open="false">

                <input type="hidden" name="menu-element-id" value="${element.id}">
                <input type="hidden" name="menu-element-level" value="2">

                <span class="menu-element-name">
                    ${element.name}
                </span>
                <div class="menu-element-description">
                    <p>
                        ${element.description ? element.description : ''}
                    </p>
                </div>
                <div class="list-of-subelements list-of-third-level-subelements"
                     data-list-of-subelements
                     data-list-of-third-level-subelements>
                </div>
            </div>
        `;
        elementsHtml += elementHtml;
    };
    return elementsHtml;
}


base.getHtmlWithThirdLevelElements = (elements) => {
    // Получаем html с элементами третьего уровня

    let elementsHtml = '';

    for (let element in elements) {
        element = elements[element]
        const elementHtml = `
            <a href="#3-${element.id}"
               class="menu-element-level third-level-element"
               data-menu-element-level>

                <input type="hidden" name="menu-element-id" value="${element.id}">
                <input type="hidden" name="menu-element-level" value="3">

                <span class="menu-element-name">
                    ${element.name}
                </span>

                <div class="menu-element-description">
                    <p>
                        ${element.description ? element.description : ''}
                    </p>
                </div>
            </div>
        `;
        elementsHtml += elementHtml;
    };

    return elementsHtml;
}
